/**
 * Copyright (C), 2021, 因特驰
 * FileName: BuyerServiceImpl
 * Author:   李晋武
 * Date:     2021/7/17 15:25
 * Description:
 * History:
 * 李晋武          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.esc.service;

import com.esc.mapper.BuyerMapper;
import com.esc.model.Buyer;
import com.esc.server.BuyerServiceApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 〈一句话功能简述〉<br> 
 * 〈〉
 *
 * @author Yun
 * @create 2021/7/17
 * @since 1.0.0
 */
@RestController
public class BuyerServiceImpl implements BuyerServiceApi {

    @Autowired
    private BuyerMapper buyerMapper;

    @Override
    public Buyer queryBuyerByPhone(@RequestParam("userPhone") String userPhone) {
        return buyerMapper.queryBuyerByPhone(userPhone);
    }

    @Override
    public void addBuyer(@RequestBody Buyer buyer) {
        buyerMapper.addBuyer(buyer);
    }
}